/**
 * Created by chengming on 18/4/16.
 * version 1.0
 */
"use strict";
const os = require('os');
const interfaces = os.networkInterfaces();
const logger = require('../conf/logger');

module.exports = function(){
	
	for (let key in interfaces) {
		for(let detail of interfaces[key]){
			if(detail.family == 'IPv4' && !detail.address.startsWith('127')
				&& !detail.address.startsWith('192.168')
				&& !detail.address.startsWith('10.')
				&& !detail.address.startsWith('172.')){
				return detail.address;
			}
		}
	}
}


